package com.ubs.dom;

import java.io.Serializable;

/**
 * There is no setters from secured methods (setBalance, setEnabled etc).
 * All secured methods must be exposed in AccountController API as a separated call 
 * with an appropriate Acegi annotation.
 * 
 * 
 * @author box
 *
 */
public final class Account implements Serializable {

	private static final long serialVersionUID = 171800178534104425L;

	private Integer id;
	
	private String login;
	
	private String passwordMD5;
	
	private String firstName;
	
	private String lastName;
	
	private String email;
	
	private String phoneNumber;

	private boolean enabled;

	private Float balance;
	
	public Account(){
	}

	public Account(Integer id, String login, String email, Float balance, boolean enabled) {
		
		this();
		this.id = id;
		this.login = login;
		this.email = email;
		this.balance = balance;
		this.enabled = enabled;
	}

	public Account(String login, String password, String fistName, String lastName,
			String email) {
		
		this(null, login, email, null, false);
	}

	public Integer getId() {
		return id;
	}

	public String getLogin() {
		return login;
	}

	public void setPasswordMD5(String passwordMD5) {
		this.passwordMD5 = passwordMD5;
	}

	public String getPasswordMD5() {
		return passwordMD5;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public float getBalance() {
		return balance;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public String getEmail() {
		return email;
	}
}
